Week 01: Principles and practices

Getting started


This is week #1 of FabAcademy 2024. We will start by installing some software that we are going to use during the different activities and projects. We start with Visual Studio Code. You can choose any editor you want or prefer. I choose Visual studio because you can use it in Windows, Linux, macOS and web. And a very important characteristics is that is compatible with GIT.

What is Visual Studio Code?

Visual Studio is a powerful developer tool that you can use to complete the entire development cycle in one place. It is a comprehensive integrated development environment (IDE) that you can use to write, edit, debug, and build code, and then deploy your app. Beyond code editing and debugging, Visual Studio includes compilers, code completion tools, source control, extensions, and many more features to enhance every stage of the software development process.

It supports a variety of features and languages, for example, build, debug, and test .NET and C++ apps, edit ASP.NET pages in the web designer view, develop cross-platform mobile and desktop apps with .NET, or build responsive Web UIs in C#.(Microsoft)

Features:

Data from: Microsoft

Let's start with our first task:

1. Visual Studio Code:


Here are the steps to install Visual Studio Code:

  1. Go to google and type: Visual Studio Code
  2. Click the first link, you can use the next link: Visual Studio
  3. Go to google and type: Visual Studio Code


4.Then click the button download for windows (or your operating system).
5.The setup packet is the one shown in the image below.



2. Git:


What is Git?

Git is a version control system in the world today is Git. Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.

Features:

Data from: Git

Lets download Git:

1. Go to google and type: GIT
2. Click the first link as shown in the left image from below: git-scm
3. Then click the button download for windows. (see the right image)


Software installation

Now that we have our tools, we can install them and configure them and work properly. Remember that you can choose the tools you wish, for coding, but Git you have to use it.

1. Installing Visual Studio Code

Steps to download Visual Studio Code:

  1. Double click the installation package
  2. Accept the terms and click next.
  3. Choose the folder where you want to setup and the direct access. (It’s already given, don’t change it)


  1. Select the direct access you wish to add.
  2. And finally click on the install button. You will see the next screen shot:
  3. And there we have it!

Git-scm

Now we proceed with GIT. Here are the steps:

  1. Double click the GIT installation package download before.
  2. Click next to start installation:
  3. Select the installation folder (don’t change it) and click next.
  4. Choose the component you´ll need and click next.
  1. Select where the shortcuts should be place (Don´t change it) and click next.
  2. Careful in this step. Normally we don´t put much attention while installing something. In this part you must choose the editor you´re going to use. In my case, remember, Visual Studio Code and click next.
  3. Choose Git from command line and also from 3rd-party software and click next
  1. Choose Use bundled OpenSSH.
  2. Choose Use the OpenSSL library.
  3. Choose Git from command line and also from 3rd-party software and click next
  1. Click on the next bottom for next steps untill you get to the screen with the install bottom.

  1. Finally click on the install button and wait for it to finish.
  2. Wait for it to end.
  3. You have successfully installed Git.



3. Connecting GIT and Visual Studio Code

This is a very important step, before we start using GIT and Visual Studio Code, we got to connect them. But, why? We are going to use Visual Studio Code to make changes in our web page. So, before making any changes, I´m going to see them locally. Follow the next steps:

  1. Visit: gitlab
  2. Sign in, choose fablabs button that appears at the end of the page
  3. Give Authorization.

  1. Open Git and type: ssh-keygen -t ed25519 -C “GeoFablab”. Verify the sintax, the only thing youre going to chang is the tex inside the " ".
  2. It generates the key.


  1. Next, double enter and this generates de key and copies it.
  2. Now, go Back to gitlab and clic on SSH Keys.
  3. Click on Add new keys bottom

  1. Paste the key you copy in step 7 and define title, Usage type, Expiration date and clic Add key.
  2. Let’s go back to git and verify ,using ssh -T git@gitlab.fabcloud.org


Important: why I did all this?


So we can make changes from Visual Studio Code and then upload it to gitlab. We are almost finish, just a few more steps.

  1. We clone Git
  2. Copy code from gitlab (right upper side of the page)
  3. Use git clone command + code




P.I.C.N.I.C error section:

This part is to share some errors I made and the solutions. Look at the images below

1. First error:

2. Second error:

Let me tell that I was struggling with this next part because I was omitting important info. I try to upload my files. I use: git commit -m “prueba” just to check if everything was Ok. But as you see, and error come up: Author identity unknown.

So, I used the next commands to fix it:

And “¡Uala!” Finally, I -- commit (no error) and Push.

FYI: Later I saw the Git Basics Episode 3 video and there was the explanation.



Conclusions:

What did I learn in this week?